#ifndef _LXP_VECTOR_GENERATOR_H_
#define _LXP_VECTOR_GENERATOR_H_

#include "def.h"
#include <string>
#include <fstream>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#include <iostream>

class VectorGenerator{
	public:
		VectorGenerator(std::string outfile, std::string infile);
		~VectorGenerator();
		
		void openOutputFile();
		void parsePartFeatureFile(std::string filename);
		void genVector(const std::map<std::string, float>& part_feature);
		void loadPartFeature(std::map<std::string, float>& part_feature);
		void loadDict();
	private:
		void setPartFeatureFilename(std::string filename);
	private:
		int nDocuments;
		std::map<std::string, float> dict;

		std::string all_feature_filename;
		std::string part_feature_filename;
		std::string all_vector_filename;
		std::ifstream all_feature_input;
		std::ifstream part_feature_input;
		std::ofstream all_vector_output;
};

#endif
